//
//  BMDailyPhotoSelectPictureGroupCell.m
//  bigmama
//
//  Created by huyuchen on 2017/9/29.
//  Copyright © 2017年 盛成文化. All rights reserved.
//

#import "BMDailyPhotoSelectPictureGroupCell.h"

@interface BMDailyPhotoSelectPictureGroupCell ()
@property (weak, nonatomic) IBOutlet UIImageView *iconView;
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;

@end

@implementation BMDailyPhotoSelectPictureGroupCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.backgroundColor = [UIColor whiteColor];
    self.contentView.backgroundColor = [UIColor whiteColor];
    self.iconView.contentMode = UIViewContentModeScaleAspectFill;
    self.iconView.layer.masksToBounds = YES;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setAlbumModel:(BMPhotoIOAlbumModel *)albumModel{
    _albumModel = albumModel;
    if (albumModel && [albumModel isKindOfClass:[BMPhotoIOAlbumModel class]]) {
        self.iconView.image = albumModel.holderImage?:[UIImage imageNamed:@"DP_avatar_holder"];
        NSString *text = [NSString stringWithFormat:@"%@(%zd)",albumModel.name,albumModel.count];
        self.titleLabel.text = text;
    }
}

@end
